import {request} from "@/utils/request.js"

//获取直播列表
export const getliveList_api = (data) => {
	return request("/liveinfo/page", "get", data);
}
//绑定直播间
export function bindLive(key) {
	return request("/share/bindLive?key=" + key, "get");
}
//获取直播详情
export function getliveInfo(id) {
	return request("/liveinfo/" + id, "get");
}
//直播答题
export const liveusertopicrecord = (data) => {
	//提交答题
	return request("/liveusertopicrecord", "post", data);
}
//查询商城用户信息
export const userInfoGet = () => {
	//查询商城用户信息
	return request("/userinfo", "get", null);
}
//红包记录
export const liverewardrecord = (data) => {
	//红包积分领取记录
	return request("/liverewardinfo/page", "get", data);
}
// 获取JSSDK配置
export const getJsApiConfig = (url) => {
  //return http.get('/wechat/jsapi-config', { params: { url } })
  
  // 生成时间戳
  const TIMESTAMP = Math.floor(Date.now() / 1000);
  // 生成随机字符串(nonceStr)
  const NONCE_STR = Math.random().toString(36).substr(2, 15);
  const wxConfig ={

  }
  
  return wxConfig;  
}

// 解密手机号
export const decryptPhone = (data) => {
  return http.post('/wechat/decrypt-phone', data)
}